package com.petecat.interchan.base.warning.config.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.petecat.interchan.base.warning.config.entity.BsWarningConfig;
import com.petecat.interchan.base.warning.rule.entity.BsWarningRule;
import com.petecat.interchan.core.mapper.BaseMapper;
import com.petecat.interchan.protocol.base.config.dto.BsWarningConfigQryDTO;
import com.petecat.interchan.protocol.base.config.vo.BsWarningConfigTreeVO;

@Mapper
@Repository
public interface IWarningConfigMapper extends BaseMapper<BsWarningConfig, String>{
	/**
	 * 查询预警配置Tree
	 * @param bsWarningConfigQryDTO
	 * @return
	 */
	List<BsWarningConfigTreeVO> queryWarningConfigTree(BsWarningConfigQryDTO bsWarningConfigQryDTO);
	
	/**
	 * 通过预警配置Id删除预警配置信息
	 * @param configId
	 */
	void removeWarningConfigByConfigId(@Param("configId") String configId);
	

	/**
	 * 通过项目ID将所有的配置关闭
	 * @param projectId
	 */
	void updateStatesByProjectId(@Param("projectId") String projectId,@Param("configId") String configId);
	
	/**
	 * 通过规则ID查询到配置信息后，通过配置ID查询配置信息
	 * @param ruleId
	 * @return
	 */
	BsWarningConfig getEwarningConfigIdByRuleId(@Param("ruleId") String ruleId);
	
}
